﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using JigLibX.Physics;
using JigLibX.Collision;
using Microsoft.Xna.Framework;
using JigLibX.Math;
using Microsoft.Xna.Framework.Graphics;
using System.Xml;
using PloobsEngine.Modelo;

namespace PloobsEngine.Physics.XJigLib
{
    public class PlaneObject : JigLibXObject
    {
        #region JigLibXObject Members


        public PlaneObject(Plane plane, Vector3 scale)
        {
            throw new Exception("Not yet Finished");
            this.scale = scale;
            Body = new Body();
            CollisionSkin = new CollisionSkin(Body);
            CollisionSkin.AddPrimitive(new JigLibX.Geometry.Plane(plane.Normal,plane.D), new MaterialProperties(0.2f, 0.7f, 0.6f));
            //PhysicsSystem.CurrentPhysicsSystem.CollisionSystem.AddCollisionSkin(CollisionSkin);            
        }

        public PlaneObject(float d)
        {
            throw new Exception("Not yet Finished");
            Body = new Body();
            CollisionSkin = new CollisionSkin(Body);
            CollisionSkin.AddPrimitive(new JigLibX.Geometry.Plane(Vector3.Up, d), new MaterialProperties(0.2f, 0.7f, 0.6f));
            //PhysicsSystem.CurrentPhysicsSystem.CollisionSystem.AddCollisionSkin(CollisionSkin);           
        }

        #endregion

        public override void DeSerialize(XmlNode node, EngineStuff engine, IModelo world, Vector3 position, Matrix rotation)
        {
            throw new NotImplementedException();
        }
        public override void Serialize(System.Xml.XmlTextWriter writer)
        {
            throw new NotImplementedException();
        }

        public override PhysicObjectTypes PhysicObjectTypes
        {
            get { return PhysicObjectTypes.PLANEOBJECT; }
        }

    }


    }

